﻿<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html>
<head>
<title>用户列表</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="<%=request.getContextPath()%>/style/adminStyle.css" rel="stylesheet" type="text/css" />
<script src="<%=request.getContextPath()%>/js/jquery.js"></script>
<script src="<%=request.getContextPath()%>/js/public.js"></script>
<script type="text/javascript">

function selets(){
	var i=1;
if(Form.tx0.value==""|Form.tx0.value==null){
	
	 i=0;
	
}
if(i==0){
	 alert("条件不能为空");
	 Form.tx0.focus();
	 return false;
}else{
	
	if(Form.che.value==0&&Form.tx0.value.length!=11||/.*[\u4e00-\u9fa5]+.*$/.test(Form.tx0.value)){
		alert("查询条件不正确");
		 return false;
	}
	if(Form.che.value==1&&Form.tx0.value.length!=11){
		alert("查询条件不正确");
		 return false;
	}
	return true;
}
	
}

</script>
</head>
<body>
 <div class="wrap">
  <div class="page-title">
    <span class="modular fl"><i></i><em>产品列表</em></span>
    <!-- <span class="modular fr"><a href="edit_product.html" class="pt-link-btn">+添加商品</a></span> -->
  </div>
  <div class="operate">
   <form action="../Administrators/product_list2.do"  name="Form">
    <select class="inline-select" id="che" name="che">
     <option value="0">UID</option>
     <option value="1">手机号</option>
     
    </select>
    <input type="text" class="textBox length-long" placeholder="输入查询关键字..." id="tx0" name="tx0"/>
    <input type="submit" value="查询" class="tdBtn" onclick="return selets()"/>
   </form>
  </div>
  <table class="list-style Interlaced">
   <tr>
    <th>ID序号</th>
    <th>头像</th>
    <th>名称</th>
    <th>账号</th>
    <th>性别</th>
    <th>签到日期</th>
    <th>UID</th>
    <th>余额</th>
    <th>积分</th>
    <th>登陆方式</th>
    <th>手机品牌</th>
    <th>等级</th>
    <th>邀请人数</th>
    <th>操作</th>
   </tr>
   <c:if test="${users.id!=null}">
   <tr>
    <td>
     <span>
     
     <i>${users.id}</i>
     </span>
    </td>
    <td class="center pic-area"><img src="${users.pictureAddress}" class="thumbnail"/></td>
    <td class="center">
      <span >${users.nickname}</span>
    </td>
    <td class="center">
     <span> ${users.accountNumber}</span>
    </td>
    <td class="center">
      <c:if test="${users.sex==0}">
		<span>女</span>
	</c:if>
      <c:if test="${users.sex==1}">
		<span>男</span>
	</c:if>
	  <c:if test="${users.sex==null}">
		<span>无</span>
	</c:if>
    </td>
	
    <td class="center">
   	<span>${users.integraltime}</span>
    </td>
    
    <td class="center">${users.uid}</td>
    <td class="center">${users.balance}</td>
    <td class="center">${users.integral}</td>
    <td class="center">${users.modes}</td>
    <td class="center">${users.brand}</td>
      <c:if test="${users.integral==null}">
    <td class="center">无</td>
    </c:if>
     <c:if test="${users.integral>=0 && users.integral<200}">
    <td class="center">贡生</td>
    </c:if>
     <c:if test="${users.integral>=200 && users.integral<500}">
    <td class="center">秀才</td>
    </c:if>
    
     <c:if test="${users.integral>=500 && users.integral<1000}">
    <td class="center">举人</td>
    </c:if>
     <c:if test="${users.integral>=1000 && users.integral<2000}">
    <td class="center">进士</td>
    </c:if>
      <c:if test="${users.integral>=2000 && users.integral<5000}">
    <td class="center">探花</td>
    </c:if>
       <c:if test="${users.integral>=5000 && users.integral<10000}">
    <td class="center">榜眼</td>
    </c:if>
       <c:if test="${users.integral>=10000}">
    <td class="center">状元</td>
    </c:if>
    <td class="center">${users.ple}</td>
    <td class="center">
     <%-- <a href="http://www.baidu.com/跳转至前台页面哦" title="查看" target="_blank"><img src="<%=request.getContextPath()%>/images/icon_view.gif"/></a> --%>
     <a href="<%=request.getContextPath()%>/Administrators/edit_product.do?id=${users.id}" title="编辑"><img src="<%=request.getContextPath()%>/images/icon_edit.gif" onclick="return que()"/></a>
    <%--  <a title="删除"><img src="<%=request.getContextPath()%>/images/icon_drop.gif"/></a> --%>
    </td>
    
   </tr>

 </c:if> 
   
  </table>
  <!-- BatchOperation -->
  <div style="overflow:hidden;">
      <!-- Operation -->
      <!-- <div class="BatchOperation fl">
				<label for="del" class="btnStyle middle" 
					id="btn1" >全选</label> <input type="button" value="删除订单"
					class="btnStyle" />
			</div> -->
			<!-- turn page -->
	<div class="turnPage center fr">
				<a href="#"
					onclick="checkFirst()">上一页</a> <a>当前：第1页,共1页</a>
				<a href="#"
					onclick="checkNext()">下一页</a>
			</div>
	 
  </div>
 </div>
 <script type="text/javascript">
 function que(){
	 var sr=${admin.jurisdiction};
	 if(sr!=3){
		 alert("权限不足");
		return false;
	 }else{
		 return true;
	 }
	 
}

 </script>
</body>
</html>